package com.arellomobile.android.push.utils.notification;

import android.annotation.SuppressLint;
import android.app.Notification;
import android.content.Context;
import android.content.pm.ApplicationInfo;
import android.content.res.Resources;
import android.graphics.Bitmap;
import android.graphics.drawable.BitmapDrawable;
import android.os.Build.VERSION;
import android.os.Bundle;
import android.widget.RemoteViews;
import com.arellomobile.android.push.preference.SoundType;
import com.arellomobile.android.push.preference.VibrateType;

public class BannerNotificationFactory extends BaseNotificationFactory
{
  public static final String sNotificationLayout = "notification";

  public BannerNotificationFactory(Context paramContext, Bundle paramBundle, String paramString1, String paramString2, SoundType paramSoundType, VibrateType paramVibrateType)
  {
    super(paramContext, paramBundle, paramString1, paramString2, paramSoundType, paramVibrateType);
  }

  @SuppressLint({"NewApi"})
  Notification generateNotificationInner(Context paramContext, Bundle paramBundle, String paramString1, String paramString2, String paramString3)
  {
    Notification localNotification = new Notification();
    int i = getContext().getResources().getIdentifier("notification", "layout", getContext().getPackageName());
    if (i == 0)
      throw new IllegalArgumentException();
    RemoteViews localRemoteViews = new RemoteViews(getContext().getPackageName(), i);
    Bitmap localBitmap = Helper.tryToGetBitmapFromInternet(getData().getString("b"), getContext(), -1);
    if (localBitmap != null)
    {
      localRemoteViews.setBitmap(getContext().getResources().getIdentifier("image", "id", getContext().getPackageName()), "setImageBitmap", localBitmap);
      localNotification.contentView = localRemoteViews;
      if (Build.VERSION.SDK_INT >= 16)
        localNotification.bigContentView = localRemoteViews;
      if (Build.VERSION.SDK_INT < 11)
        break label235;
      localNotification.tickerView = localRemoteViews;
    }
    while (true)
    {
      localNotification.icon = Helper.tryToGetIconFormStringOrGetFromApplication(getData().getString("i"), getContext());
      return localNotification;
      localRemoteViews.setBitmap(getContext().getResources().getIdentifier("image", "id", getContext().getPackageName()), "setImageBitmap", ((BitmapDrawable)getContext().getResources().getDrawable(getContext().getApplicationInfo().icon)).getBitmap());
      break;
      label235: localNotification.tickerText = paramString3;
    }
  }
}

/* Location:           E:\android\Toy Defense 2_dex2jar.jar
 * Qualified Name:     com.arellomobile.android.push.utils.notification.BannerNotificationFactory
 * JD-Core Version:    0.6.2
 */